import service from '@/utils/request'
// @Tags SeckillOrder
// @Summary 创建秒杀订单表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.SeckillOrder true "创建秒杀订单表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /seckillOrder/createSeckillOrder [post]
export const createSeckillOrder = (data) => {
  return service({
    url: '/seckillOrder/createSeckillOrder',
    method: 'post',
    data
  })
}

// @Tags SeckillOrder
// @Summary 删除秒杀订单表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.SeckillOrder true "删除秒杀订单表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /seckillOrder/deleteSeckillOrder [delete]
export const deleteSeckillOrder = (params) => {
  return service({
    url: '/seckillOrder/deleteSeckillOrder',
    method: 'delete',
    params
  })
}

// @Tags SeckillOrder
// @Summary 批量删除秒杀订单表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除秒杀订单表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /seckillOrder/deleteSeckillOrder [delete]
export const deleteSeckillOrderByIds = (params) => {
  return service({
    url: '/seckillOrder/deleteSeckillOrderByIds',
    method: 'delete',
    params
  })
}

// @Tags SeckillOrder
// @Summary 更新秒杀订单表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.SeckillOrder true "更新秒杀订单表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /seckillOrder/updateSeckillOrder [put]
export const updateSeckillOrder = (data) => {
  return service({
    url: '/seckillOrder/updateSeckillOrder',
    method: 'put',
    data
  })
}

// @Tags SeckillOrder
// @Summary 用id查询秒杀订单表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.SeckillOrder true "用id查询秒杀订单表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /seckillOrder/findSeckillOrder [get]
export const findSeckillOrder = (params) => {
  return service({
    url: '/seckillOrder/findSeckillOrder',
    method: 'get',
    params
  })
}

// @Tags SeckillOrder
// @Summary 分页获取秒杀订单表列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取秒杀订单表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /seckillOrder/getSeckillOrderList [get]
export const getSeckillOrderList = (params) => {
  return service({
    url: '/seckillOrder/getSeckillOrderList',
    method: 'get',
    params
  })
}

// @Tags SeckillOrder
// @Summary 不需要鉴权的秒杀订单表接口
// @Accept application/json
// @Produce application/json
// @Param data query systemReq.SeckillOrderSearch true "分页获取秒杀订单表列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /seckillOrder/getSeckillOrderPublic [get]
export const getSeckillOrderPublic = () => {
  return service({
    url: '/seckillOrder/getSeckillOrderPublic',
    method: 'get',
  })
}
// SeckillOrderPay 订单支付
// @Tags SeckillOrder
// @Summary 订单支付
// @Accept application/json
// @Produce application/json
// @Success 200 {object} response.Response{data=object,msg=string} "成功"
// @Router /seckillOrder/seckillOrderPay [POST]
export const seckillOrderPay = (data) => {
  return service({
    url: '/seckillOrder/seckillOrderPay',
    method: 'POST',
    data
  })
}

// HandlePaymentSuccess 手动处理支付成功
// @Tags SeckillOrder
// @Summary 手动处理支付成功
// @Accept application/json
// @Produce application/json
// @Success 200 {object} response.Response{data=object,msg=string} "成功"
// @Router /seckillOrder/handlePaymentSuccess [POST]
export const handlePaymentSuccess = (data) => {
  return service({
    url: '/seckillOrder/handlePaymentSuccess',
    method: 'POST',
    data
  })
}

// RollbackUnusedStock 活动结束后回滚未用完的库存
// @Tags SeckillOrder
// @Summary 活动结束后回滚未用完的库存
// @Accept application/json
// @Produce application/json
// @Success 200 {object} response.Response{data=object,msg=string} "成功"
// @Router /seckillOrder/rollbackUnusedStock [POST]
export const rollbackUnusedStock = (data) => {
  return service({
    url: '/seckillOrder/rollbackUnusedStock',
    method: 'POST',
    data
  })
}
